package org.yaukie.auth.service.api;

import io.jsonwebtoken.Claims;
import javax.servlet.http.HttpServletRequest;
import org.springframework.security.core.Authentication;
import org.yaukie.auth.entity.LoginUser;

public interface TokenHandlerService {
    String buildToken(LoginUser loginUser);

    boolean verifyToken(HttpServletRequest request);

    String getUserNameFromAuthentication(HttpServletRequest request);

    boolean isTokenExpired(String token);

    Authentication getAuthenticationFromToken(HttpServletRequest request);

    void refreshToken(LoginUser loginUser);

    void delLoginUser(String token);

    String getToken(HttpServletRequest request);

    Claims parseToken(String token);

    LoginUser getLoginUser(HttpServletRequest request);
}
